@extends('backend::modal')
@section('title',$page_title)
@section('content')
    <div class="row">
        <div class="col-lg-12">
            @if($info)
                @component('backend::component.form.form')
                    @slot('form_title') {{$page_title}} @endslot
                    @slot('formId') edit-prize @endslot
                    @slot('action') {{route('b_lottery_prize_update',['id'=>$info->id])}} @endslot

                    @component('backend::component.form.form-group')
                        @slot('title') 奖品名称 @endslot
                        @component('backend::component.form.input')
                            @slot('name') title @endslot
                            @slot('value') {{$info->title}} @endslot
                        @endcomponent
                    @endcomponent

                    @component('backend::component.form.form-group')
                        @slot('title') 奖品图片 @endslot
                        @component('backend::component.upload.upload_img',['imgList'=>[$info->cover=>$info->cover]])
                            @slot('name') cover @endslot
                            @slot('group') lottery @endslot
                            @slot('value') {{$info->cover}} @endslot
                        @endcomponent
                    @endcomponent

                    @component('backend::component.form.form-group')
                        @slot('title') 权重 @endslot
                        @slot('remark') 值越大，抽中几率越大 @endslot
                        @component('backend::component.form.input')
                            @slot('name') power @endslot
                            @slot('value') {{$info->power}} @endslot
                        @endcomponent
                    @endcomponent

                    @slot('buttons')
                        @component('backend::component.form.button')
                            @slot('title') 提交 @endslot
                            @slot('params') {"formId":"#edit-prize"} @endslot
                            @slot('class') btn-min-width ajax-form @endslot
                        @endcomponent
                        @component('backend::component.form.button')
                            @slot('title') 重置 @endslot
                            @slot('type') reset @endslot
                            @slot('color') danger @endslot
                            @slot('class') btn-min-width @endslot
                        @endcomponent
                    @endslot
                @endcomponent
            @else
                @include('backend::public.empty_page',['info'=>'修改信息不存在'])
            @endif
        </div>
        <!--/.col-->
    </div>
@endsection